﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace DLL.User
{
	/// <summary>
	/// 用户视图控制类
	/// </summary>
	/// <![CDATA[2014-8-7 17:52:59]]>
	public class View : DLL.ShowLayer.FormView
	{
		private Component clsthisComp;

		#region 添加、修改
		private TextBox tbUsername = new TextBox();		// 用户名
		private DropDownList ddlUserGroup = new DropDownList();		// 用户组
		private DropDownList ddlDepartment = new DropDownList();		// 单位
		#endregion 添加、修改

		#region 查询
		private TextBox tbQueryUsername = new TextBox();		// 查询用户名
		private DropDownList ddlQueryUserGroup = new DropDownList();		// 查询用户组
		#endregion 查询

		#region 浏览

		#endregion 浏览

		public View(System.Web.UI.Page page)
			: base(page)
		{
			clsthisComp = new Component(page);

			clsComp = clsthisComp;
			clsControls.ShowUserGroup(ddlUserGroup);
			clsControls.ShowAllDepartment(ddlDepartment);
			listAddEdit.Add(new TonyNet4V1.Structs.TitleControlEntity("用户名", "TextBox", tbUsername, "string", "strUsername"));
			listAddEdit.Add(new TonyNet4V1.Structs.TitleControlEntity("用户组", "DropDownList", ddlUserGroup, "int", "nUserGroupID"));
			listAddEdit.Add(new TonyNet4V1.Structs.TitleControlEntity("单位", "DropDownList", ddlDepartment, "int", "nDepartmentID"));

			clsControls.ShowUserGroupWithAll(ddlQueryUserGroup);
			listQuery.Add(new TonyNet4V1.Structs.TitleControlEntity("用户名", "TextBox", tbQueryUsername, "string", "strLikeUsername"));
			listQuery.Add(new TonyNet4V1.Structs.TitleControlEntity("用户组", "DropDownList", ddlQueryUserGroup, "int", "nUserGroupID"));
		}

		#region 类型转换

		protected override TonyNet4V1.EntityBase GetEntity()
		{
			return new Entity();
		}

		protected override TonyNet4V1.QueryEntityBase GetQuery()
		{
			return new QueryEntity();
		}

		protected override TonyNet4V1.ComponentBase GetComponent()
		{
			return clsthisComp;
		}

		#endregion 类型转换

		
	}
}
